package de.teamgamma.cansat.groundstation.export;

import java.awt.Font;

import org.jfree.chart.ChartPanel;
import org.jfree.chart.JFreeChart;

import de.szut.gui.language.TranslatableStyledButton;

/**
 * Default Chart Panel for every chart panel
 * @author Marc Huisinga
 *
 */
public class DefaultChartPanel extends ChartPanel {
	/**
	 * X-Position of the return button
	 */
	public static final int RETURNBUTTONX = 499;
	/**
	 * Y-Position of the return button
	 */
	public static final int RETURNBUTTONY = 350;
	/**
	 * Width of the return button
	 */
	public static final int RETURNBUTTONWIDTH = 90;
	/**
	 * Height of the return button
	 */
	public static final int RETURNBUTTONHEIGHT = 20;
	
	private static final long serialVersionUID = 717320814096415703L;

	private TranslatableStyledButton returnButton;
	
	public DefaultChartPanel(JFreeChart chart) {
		super(chart);
		setLayout(null);
		
		returnButton = new TranslatableStyledButton();
		returnButton.setBounds(RETURNBUTTONX, RETURNBUTTONY, RETURNBUTTONWIDTH, RETURNBUTTONHEIGHT);
		returnButton.setFont(new Font("Tahoma", Font.PLAIN, 14));
		add(returnButton);
	}

	/**
	 * Gets the return button on the default panel
	 * @return return button
	 */
	public TranslatableStyledButton getReturnButton() {
		return returnButton;
	}

	/**
	 * Sets the return button on the default panel
	 * @param returnButton
	 */
	public void setReturnButton(TranslatableStyledButton returnButton) {
		this.returnButton = returnButton;
	}
}
